<svg style="display: block; width: 0; height: 0">
	<defs>
		<filter id="drop-shadow">
			<fegaussianblur in="SourceAlpha" stdDeviation="0"></fegaussianblur>
			<feoffset dx="0" dy="10" result="offsetblur"></feoffset>
			<feflood flood-color="rgba(0,0,0,1)"></feflood>
			<fecomposite in2="offsetblur" operator="in"></fecomposite>
			<femerge>
				<femergenode></femergenode>
				<femergenode in="SourceGraphic"></femergenode>
			</femerge>
		</filter>
	</defs>
</svg>
<canvas id="canvas" width="100" height="100"></canvas>
<script>
var canvas = document.getElementById('canvas');
var ctx = canvas.getContext('2d');
ctx.filter = 'url(#drop-shadow)';
ctx.fillStyle = '#0f0';
ctx.fillRect(25, 25, 50, 40);
</script>
